# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Stas Rudakou <stas at garage22 dot net>

pkgname=cobalt
pkgver=0.18.3
pkgrel=1
pkgdesc='Static site generator written in Rust'
url='https://cobalt-org.github.io/'
arch=('loong64' 'x86_64')
license=('MIT')
depends=('openssl' 'libsass' 'glibc' 'gcc-libs')
makedepends=('rust' 'cargo')
source=(https://github.com/cobalt-org/cobalt.rs/archive/v${pkgver}/${pkgname}.rs-v${pkgver}.tar.gz)
sha512sums=('d1e0e7ea32c770ae4c49f32bb416c63393658eb0505bb4a63b976b86b98a0e391f51697f15f5efdde40c8f7dd4c98a10b2ccddd8d3f5d703035f2c814c5b8425')
b2sums=('94f1396af4d8254532bd1fcf7008b26ada49725a319c31bba3a94648a76c9b3565a29501d7e27df766021d48a8abd4da2198c9f41f49787136d8e8cf65701631')

build() {
  cd ${pkgname}.rs-${pkgver}
  cargo build --release --locked --features 'syntax-highlight sass'
}

check() {
  cd ${pkgname}.rs-${pkgver}
  cargo test --release --locked
}

package() {
  cd ${pkgname}.rs-${pkgver}
  install -Dm 755 target/release/cobalt -t "${pkgdir}/usr/bin"
  install -Dm 644 LICENSE-MIT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
